package com.hxy.qrcode.controller;

import com.hxy.common.pojo.CommonResult;
import com.hxy.network.core.webScoket.WebSocketServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @program: component_code_integration
 * @author: HCY
 * @create: 2022/05/07 11:13
 */
@RestController
@RequestMapping("/qrcode/")
public class QrcodeController {

    @Autowired
    private WebSocketServer webSocketServer;


    @PostMapping("sendMsg")
    public CommonResult sendMessage(String uuid){
        webSocketServer.sendMessageToOthers("aaa",uuid);
        return CommonResult.success("发送成功");
    }
}
